<!--头部公共部分-->
{include file="common/header" /}
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a>首页</a>
        <a>财务</a>
        <a>
          <cite>资金流水</cite></a>
      </span>
    <a class="layui-btn layui-btn-xs layui-btn-small" style="float:right;margin-top: 10px;"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon layui-icon-refresh"></i> </a>
</div>
<div class="layui-tab layui-tab-card" lay-filter="filter">

    <ul class="layui-tab-title">
        <li class="layui-this">资金流水</li>
        <li>退费记录</li>
        <li>扣费记录</li>
        <li>扣费取消记录</li>
    </ul>
    <div class="layui-tab-content" >
        <div class="layui-tab-item layui-show">
            <div class="x-body">
                <div class="layui-row">
                    <div class="layui-form layui-col-md12 x-so layui-form-pane">
                        <!--
                        <div class="layui-input-inline">
                            <input type="text"  name="student_name" placeholder="学生姓名" autocomplete="off" class="layui-input">
                        </div>
                        -->
                        <div class="layui-input-inline">
                            <input type="text" name="receipt_number" placeholder="收支流水号" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" name="contract_number" placeholder="订单编号" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" name="day" placeholder="请选择日期" autocomplete="off" id="searchday" style="width:190px;">
                        </div>
                        <div class="layui-input-inline">
                            <select name="type" lay-verify="required" lay-search="">
                                <option value="">流水类型</option>
                                <option value="1">收入</option>
                                <option value="2">支出</option>
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <button class="layui-btn" data-type="reload" id="search">筛选</button>
                            <button class="layui-btn layui-btn-danger" id="clear">重置</button>
                        </div>
                    </div>
                </div>
                <!--
                <div class="site-demo-button" lay-filter="selBtn" id="typeclass">
                    <button class="layui-btn site-demo-active layui-btn-warm" data-type="all">全部流水</button>
                    <button class="layui-btn site-demo-active" data-type="1">订单收入流水</button>
                    <button class="layui-btn site-demo-active" data-type="2">订单支出流水</button>
                    <button class="layui-btn site-demo-active" data-type="3">电子账户收入流水</button>
                    <button class="layui-btn site-demo-active" data-type="4">电子账户支出流水</button>
                    <button class="layui-btn site-demo-active" style="float: right;" data-type="today">导出</button>
                    <button class="layui-btn site-demo-active layui-btn-warm" style="float: right;" data-type="all">导入</button>
                </div>
                -->
                <table class="layui-table" id="datalist" lay-filter="Event"></table>
            </div>
        </div>
        <div class="layui-tab-item layui-show">
            <div id="refundrecord" class="x-body" style="visibility: hidden" class="clear:both;">
                <div class="layui-row"
                     style="padding-left:20px;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;">
                    <div class="layui-form layui-col-md12 x-so layui-form-pane"  lay-filter="form-organization">
                        <div class="layui-input-inline">
                            <select name="campus_id" lay-verify="required" lay-search="">
                                <option value="">选择校区</option>
                                {volist name="campus_name" id="campu"}
                                <option value="{$campu.id}">{$campu.campus_name}</option>
                                {/volist}
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" name="student_name" placeholder="请输入学生姓名" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" name="receipt_number"  placeholder="退款凭证" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" name="contract_number_refund"  placeholder="订单编号" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <select name="refund_channel" lay-verify="required" lay-search="">
                                <option value="">选择退款通道</option>
                                {foreach name="data[20]" id="vo"}
                                <option value="{$vo.id}">{$vo.name}</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" style="width: auto" placeholder="选择退款日期" name="refund_date" id="start_refund">
                        </div>
                        <div class="layui-input-inline">
                            <button class="layui-btn" id="search_refund">
                                <i class="layui-icon layui-icon-search"></i>筛选</button>
                            <button class="layui-btn layui-btn-danger" id="clear_refund">
                                <i class="layui-icon"></i>重置</button>
                        </div>
                    </div>
                </div>
                <table class="layui-hide" id="LAY_table_user" lay-filter="Event"></table>
                <script type="text/html" id="barTable">
                    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
                </script>
            </div>
        </div>
        <div class="layui-tab-item">
            <div id="deduction_record" class="x-body" class="clear:both;">
                <div class="layui-row"
                     style="padding-left:20px;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;">
                    <div class="layui-form layui-col-md12 x-so layui-form-pane"  lay-filter="form-organization">
                        <div class="layui-input-inline">
                            <input type="text" name="student_name_deduction" placeholder="请输入学生姓名" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" name="contract_number_deduction" placeholder="订单编号" autocomplete="off" class="layui-input">
                        </div>

                        <div class="layui-input-inline">
                            <input type="text" style="width: 180px;" name="class_date_deduction"  id="date_class_deduction" placeholder="选择日期范围" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <button class="layui-btn" id="search_deduction">
                                <i class="layui-icon layui-icon-search"></i>筛选</button>
                            <button class="layui-btn layui-btn-danger" id="clear_deduction">
                                <i class="layui-icon"></i>重置</button>
                        </div>
                    </div>
                </div>
                <table class="layui-hide" id="LAY_table_user_deduction" lay-filter="Event"></table>
                <script type="text/html" id="barTable_deduction">
                    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="cancel_deduction">取消扣费</a>
                </script>
            </div>
        </div>
        <div class="layui-tab-item">
            <div id="deduction_cancle_record" class="x-body" class="clear:both;">
                <div class="layui-row"
                     style="padding-left:20px;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;">
                    <div class="layui-form layui-col-md12 x-so layui-form-pane"  lay-filter="form-organization">
                        <div class="layui-input-inline">
                            <input type="text" name="student_name_cancel" placeholder="请输入学生姓名" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" name="contract_number_cancel" placeholder="订单编号" autocomplete="off" class="layui-input">
                        </div>

                        <div class="layui-input-inline">
                            <input type="text" style="width: 180px;" name="create_time_cancel"  id="time_create_cancel" placeholder="选择日期范围" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <button class="layui-btn" id="search_cancel">
                                <i class="layui-icon layui-icon-search"></i>筛选</button>
                            <button class="layui-btn layui-btn-danger" id="clear_cancel">
                                <i class="layui-icon"></i>重置</button>
                        </div>
                    </div>
                </div>
                <table class="layui-hide" id="LAY_table_user_cancel" lay-filter="Event"></table>
            </div>
        </div>
    </div>

</div>
<!--底部公共部分-->
{include file="common/footer" /}
<script>
    layui.use(['table', 'element', 'laydate', 'layer'], function () {
        var table = layui.table,
            laydate = layui.laydate,
            element = layui.element,
            layer = layui.layer,
            $ = layui.$;

        let loading = layui.loading;

        element.on('tab(filter)', function(data){
            console.log(this); //当前Tab标题所在的原始DOM元素
            console.log(data.index); //得到当前Tab的所在下标
            console.log(data.elem); //得到当前的Tab大容器

            if(data.index === 1){
                document.getElementById("refundrecord").style.visibility="visible";
            }else{
                document.getElementById("refundrecord").style.visibility="hidden";
            }




        });

        laydate.render({
            elem: '#searchday', //指定元素
            range: true,
            trigger: 'click',
            value: '',
            // btns: ['now', 'confirm'],
            ready: function(date) {
                //得到初始的日期时间对象：{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
            },
            done: function(value, date, endDate) {
            }
        });


        //方法级渲染
        var tableIns = table.render({
            elem: '#datalist',
            url: '{:url("finance/capital_flow")}',
            method: 'POST',
            cols: [[
                {field: 'receipt_number', style:'color:#01AAED;font-weight: bold;', title: '收支流水号', width: 200, align: 'center'},
                {field: 'contract_number', title: '订单编号', width: 200, align: 'center'},
                {field: 'signing_type_text', title: '合同类型', width: 100, align: 'center'},
                {field: 'amount', title: '金额', width: 150, align: 'center'},
                {field: 'campus', title: '校区', width: 100, sort: true, fixed: false, align: 'center'},
                {field: 'operator', title: '操作人', width: 90, align: 'center'},
                {field: 'student_name', title: '学员姓名', width: 90, align: 'center'},
                {field: 'phone', title: '学员电话', width: 120, align: 'center'},
                {field: 'grade', title: '学员年级', width: 90, align: 'center'},
                {field: 'contract_type_text', title: '类型', width: 90, align: 'center'},
                {field: 'remark', title: '描述', width: 250, align: 'center'},
                {field: 'course', title: '项目名称', width: 500, align: 'center'},
                {field: 'paydate', title: '时间', width: 170, align: 'center'},
            ]],
            page: true,
            height: 'full-230',
            done: function (res, curr, count) {
                //如果是异步请求数据方式，res即为你接口返回的信息。
                //如果是直接赋值的方式，res即为：{data: [], count: 99} data为当前页数据、count为数据总长度
            }
        });

        //批量软删除
        $('#del').click(function () {
            var checkStatus = table.checkStatus('Event'); //test即为基础参数id对应的值
            if (checkStatus.data.length == 0) {
                layer.msg('请选择要批量处理的数据！');
                return false;
            }
            layer.confirm('确认删除？',{btn:['确定','取消']},function(index){
                var checked_ids = [];
                var file_id= 0;
                for (let index = 0; index < checkStatus.data.length; index++) {
                    const element = checkStatus.data[index];
                    checked_ids.push(element.id)
                    file_id = element.file_id;
                }
                var data ={"ids":checked_ids.join(','),status:1};
                console.log(data);
                var url = '{:url("finance/batchdel")}';
                $.post(url,data,function(response){
                    layer.msg(response.msg);
                    if(response.code == 0){
                        tableIns.reload();
                    }
                });
            });
        });

        //订单分类选择
        $('.site-demo-active').on('click', function () {
            $('#typeclass').find('button').removeClass('layui-btn-warm');
            $(this).addClass('layui-btn-warm');
            var type = $(this).data('type');
            tableIns.reload({
                where: {
                    'type': type
                }
            });
        });

        table.on('checkbox(Event)', function (obj) {});

        //监听工具条
        table.on('tool(Event)', function (obj) {
            var data = obj.data; //获得当前行数据
            var layEvent = obj.event; //获得 lay-event 对应的值
            if (layEvent === 'edit') {
                var url = '{:url("contract/edit")}?id=' + data.id;
                location.href = url;
            } else if (layEvent === 'payment') {
                var url = '{:url("contract/payment")}?id=' + data.id;
                layer.open({
                    type: 2,
                    title: '付款',
                    shadeClose: true,
                    shade: 0.8,
                    area: ['50%', '70%'],
                    content: url
                });
            }
        });
        //搜索项
        $('#search').click(function () {
            var field = {};
            field.receipt_number = $('input[name=receipt_number]').val();
            field.contract_number = $('input[name=contract_number]').val();
            field.type = $('select[name=type]').val();
            field.day = $('input[name=day]').val();

            console.log(field);
            tableIns.reload({
                where: field,
                method: 'POST',
                page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
        });
        //清除
        $('#clear').click(function () {
            $('.layui-form-pane').find('.layui-input-inline').each(function (index, element) {
                $(element).find('input[type=text]').val('');
                $(element).find('select').val('');
            })
            tableIns.reload({
                where: {
                    'receipt_number': '',
                    'contract_number': '',
                    'day': '',
                    'type': '',
                },
                page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
        });

        /**********退费记录*************/

            //数据表格 方法级渲染
        var tableIns_refund = table.render({
                elem: '#LAY_table_user'
                , url: '{:url("finance/refundlist")}'
                , method: 'POST'
                , loading: true
                , parseData: function (res) { //res 即为原始返回的数据
                    if (res.code === 1) {
                        res.code = 0;
                    } else {
                        res.code = -1;
                    }
                    return {
                        "code": res.code, //解析接口状态
                        "msg": res.message, //解析提示文本
                        "count": res.data.total, //解析数据长度
                        "data": res.data.data //解析数据列表
                    };
                },
                cols: [[
                    {field: 'receipt_number', title: '退款凭证', style:'color:#01AAED;font-weight: bold;', width: 200, sort: true, fixed: false, align: 'center'
                    }, {field: 'contract_number', title: '订单编号', width: 200, sort: true, fixed: false, align: 'center'
                    }, {field: 'campus_name', title: '退款校区', width: 120, align: 'center'
                    }, {field: 'signing_type_text', title: '类型', width: 120, align: 'center'
                    }, {field: 'student_name', title: '学员姓名', width: 100, align: 'center'
                    }, {field: 'total_amount', title: '订单总额(元)', width: 120, align: 'center'
                    }, {field: 'amount', title: '已收金额(元)', width: 120, align: 'center'
                    }, {field: 'balance', title: '账户余额(元)', width: 120, align: 'center'
                    }, {field: 'experienced_person', title: '操作人', width: 100, align: 'center'
                    }, {field: 'refund_channel_text', title: '退款通道', width: 100, align: 'center'
                    }, {field: 'refund_amount', title: '退款金额(元)', style:'color:#FF5722;font-weight: bold;', width: 120, align: 'center'
                    }, {field: 'update_time', title: '退款时间', width: 200, align: 'center',edit: 'text'
                    }, {fixed: 'right', title: '操作', width: 100, align: 'center', toolbar: '#barTable'}
                ]]
                , height: 'full-180'
                , page: true
                , done: function () {
                    layer.close(loading);
                }
            });
        //日期
        laydate.render({
            elem: '#start_refund',
            range:true
        });

        //搜索项
        $('#search_refund').click(function () {
            var field = {};
            field.student_name = $('input[name=student_name]').val();
            field.campus_id = $('select[name=campus_id]').val();
            field.refund_channel = $('select[name=refund_channel]').val();
            field.receipt_number = $('input[name=receipt_number]').val();
            field.contract_number = $('input[name=contract_number_refund]').val();
            var create_date_rang = $('input[name=refund_date]').val();
            if(create_date_rang.length > 0){
                strs_date=create_date_rang.split("-"); //字符分割
                field.start_date = strs_date[0]+'-'+strs_date[1]+'-'+strs_date[2];
                field.end_date = strs_date[3]+'-'+strs_date[4]+'-'+strs_date[5];
            }
            console.log(field);
            tableIns_refund.reload({
                where: field,
                method: 'POST',
                page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
        });//清除
        $('#clear_refund').click(function () {
            $('.layui-form-pane').find('.layui-input-inline').each(function (index, element) {
                $(element).find('input[type=text]').val('');
                $(element).find('select').val('');
            })
            tableIns_refund.reload({
                where: {
                    'student_name': '',
                    'receipt_number': '',
                    'refund_channel': '',
                    'contract_number_refund': '',
                    'refund_date': '',
                },
                page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
        });


        /**********扣费记录*************/
        //日期
        laydate.render({
            elem: '#date_class_deduction',
            range: true,
        });

        //数据表格 方法级渲染
        var tableIns_deduction = table.render({
            elem: '#LAY_table_user_deduction'
            , url: '{:url("finance/getDeductionLists")}'
            , method: 'POST'
            , loading: true
            , parseData: function (res) { //res 即为原始返回的数据
                if (res.code === 1) {
                    res.code = 0;
                } else {
                    res.code = -1;
                }
                return {
                    "code": res.code, //解析接口状态
                    "msg": res.message, //解析提示文本
                    "count": res.data.total, //解析数据长度
                    "data": res.data.data //解析数据列表
                };
            },
            cols: [[
                 {field: 'student_name', title: '学员姓名', width: 150, sort: true, fixed: false, align: 'center'
                }, {field: 'contract_number', title: '订单编号', width: 200, align: 'center'
                }, {field: 'class_date', title: '开课日期', width: 150, align: 'center'
                }, {field: 'grades_name', title: '教室', width: 300, sort: true, fixed: false, align: 'center'
                }, {field: 'course_text', title: '课程', width: 300, align: 'center'
                }, {field: 'duration', title: '时长(分钟)', width: 120, align: 'center'
                }, {field: 'teacher', title: '老师', width: 120, align: 'center'
                }, {field: 'headmaster', title: '班主任', width: 120, align: 'center'
                }, {field: 'eliminated_nums', title: '课消数量(课时)', width: 200, align: 'center'
                }, {field: 'amount_deducted', title: '扣费(元)', width: 120, align: 'center'
                }, {field: 'attendance_text', title: '考勤', width: 100, align: 'center'
                }, {field: 'attendance_reasons', title: '缺勤原因', width: 120, align: 'center'
                }, {field: 'operatorer', title: '操作人', width: 120, align: 'center'
                }, {field: 'update_time', title: '操作日期', width: 200, align: 'center'
                }, {fixed: 'right', title: '操作', width: 100, align: 'center', toolbar: '#barTable_deduction'}
            ]]
            , height: 'full-180'
            , page: true
            , done: function () {
                layer.close(loading);
            }
        });
        //搜索项
        $('#search_deduction').click(function () {
            var field = {};
            field.student_name = $('input[name=student_name_deduction]').val();
            field.contract_number = $('input[name=contract_number_deduction]').val();
            var strs_date= new Array(); //定义一数组
            var create_date_rang = $('input[name=class_date_deduction]').val();
            if(create_date_rang.length > 0){
                strs_date=create_date_rang.split("-"); //字符分割
                field.start_date = strs_date[0]+'-'+strs_date[1]+'-'+strs_date[2];
                field.end_date = strs_date[3]+'-'+strs_date[4]+'-'+strs_date[5];
            }
            //field.class_date = $('input[name=class_date]').val();
            console.log(field);
            tableIns_deduction.reload({
                where: field,
                method: 'POST',
                page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
        });//清除
        $('#clear_deduction').click(function () {
            $('.layui-form-pane').find('.layui-input-inline').each(function (index, element) {
                $(element).find('input[type=text]').val('');
                $(element).find('select').val('');
            })
            tableIns_deduction.reload({
                where: {
                    'start_date': '',
                    'end_date': '',
                    'student_name_deduction': '',
                    'class_date_deduction': '',
                    'contract_number_deduction':''
                },
                page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
        });


        /**********扣费取消记录*************/
            //数据表格 方法级渲染
        var tableIns_cancel = table.render({
                elem: '#LAY_table_user_cancel'
                , url: '{:url("finance/getcancelDeductionLists")}'
                , method: 'POST'
                , loading: true
                , parseData: function (res) { //res 即为原始返回的数据
                    if (res.code === 1) {
                        res.code = 0;
                    } else {
                        res.code = -1;
                    }
                    return {
                        "code": res.code, //解析接口状态
                        "msg": res.message, //解析提示文本
                        "count": res.data.total, //解析数据长度
                        "data": res.data.data //解析数据列表
                    };
                },
                cols: [[
                     {field: 'student_name', title: '学员姓名', width: 150, sort: true, fixed: false, align: 'center'
                    }, {field: 'contract_number', title: '订单编号', width: 200, align: 'center'
                    }, {field: 'grades_name', title: '教室', width: 200, sort: true, fixed: false, align: 'center'
                    }, {field: 'course_text', title: '课程', width: 300, align: 'center'
                    }, {field: 'duration', title: '时长(分钟)', width: 120, align: 'center'
                    }, {field: 'teacher', title: '老师', width: 120, align: 'center'
                    }, {field: 'headmaster', title: '班主任', width: 120, align: 'center'
                    }, {field: 'cancel_reason', title: '取消扣费原因', width: 300, align: 'center'
                    }, {field: 'eliminated_nums', title: '课消数量(课时)', width: 200, align: 'center'
                    }, {field: 'amount_deducted', title: '取消扣费金额(元)', width: 180, align: 'center'
                    }, {field: 'status_text', title: '状态', width: 120, align: 'center'
                    }, {field: 'operatorer', title: '操作人', width: 120, align: 'center'
                    }, {field: 'create_time', title: '扣费取消时间', width: 200, align: 'center'
                    },
                ]]
                , height: 'full-180'
                , page: true
                , done: function () {
                    layer.close(loading);
                }
            });
        //日期
        laydate.render({
            elem: '#time_create_cancel',
            range: true,
        });
        //搜索项
        $('#search_cancel').click(function () {
            var field = {};
            field.student_name = $('input[name=student_name_cancel]').val();
            field.contract_number = $('input[name=contract_number_cancel]').val();
            var strs_date= new Array(); //定义一数组
            var create_date_rang = $('input[name=create_time_cancel]').val();
            if(create_date_rang.length > 0){
                strs_date=create_date_rang.split("-"); //字符分割
                field.start_date = strs_date[0]+'-'+strs_date[1]+'-'+strs_date[2];
                field.end_date = strs_date[3]+'-'+strs_date[4]+'-'+strs_date[5];
            }
            console.log(field);
            tableIns_cancel.reload({
                where: field,
                method: 'POST',
                page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
        });
        //清除
        $('#clear_cancel').click(function () {
            $('.layui-form-pane').find('.layui-input-inline').each(function (index, element) {
                $(element).find('input[type=text]').val('');
                $(element).find('select').val('');
            })
            tableIns_cancel.reload({
                where: {
                    'start_date': '',
                    'end_date': '',
                    'student_name_cancel': '',
                    'contract_number_cancel':'',
                    'create_time_cancel': '',
                },
                page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
        });


        //监听工具条
        table.on('tool(Event)', function (obj) {
            var data = obj.data; //获得当前行数据
            var layEvent = obj.event; //获得 lay-event 对应的值
            var tr = obj.tr; //获得当前行 tr 的DOM对象
            if(layEvent === 'del'){
                layer.confirm('真的删除该退费记录吗?', function (index) {
                    $.post("{:url('finance/del')}", {
                        id: data.id
                    }, function (result) {
                        if (result.code === 1) {
                            layer.msg(result.msg, {
                                time: 2000
                            });
                            tableIns_refund.reload();

                        } else {
                            layer.msg(result.msg, {
                                icon: 2,
                                time: 2000
                            });
                        }
                    }, "json")
                });
            }else if(layEvent === 'cancel_deduction'){
                layer.prompt({
                    formType: 2,
                    title: '确定取消本次扣费?【请在输入框描述取消扣费原因】',
                    area: ['300px', '50px'] //自定义文本域宽高
                }, function(value, index, elem){
                    var isLoad;
                    var field = {};
                    field.id = data.id;
                    field.campus_id = data.campus_id;
                    field.cancel_describe = value;
                    $.ajax({
                        url: '/admin/finance/cancel',
                        method: "post",
                        data: field,
                        beforeSend: function () {
                            isLoad = layer.load(0, {
                                shade: false
                            }); //0代表加载的风格，支持0-2
                        },
                        success: function (result) {
                            layer.msg(result.msg);
                            if (result.code === 1) {
                               tableIns_deduction.reload();
                            }
                        },
                        complete: function () {
                            layer.close(isLoad)
                        },
                        error: function (error) {
                            console.log(error)
                        }
                    });
                    layer.close(index);
                    return false;

                });

            }
        });

    });
</script>
<script>var _hmt = _hmt || [];
(function () {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();</script>
</body>
</html>